package com.fit.WatchShop.service;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

import com.fit.WatchShop.interfaces.Watch;

public class WatchesBean implements Watches {
	
        private Map<String, Watch> watches = new HashMap<String, Watch>();

        public Collection<Watch> retrieve() {
                return watches.values();
        }

        public Watch save(Watch watch) {
                return watches.put(watch.getType(), watch);
        }

        public Watch retrieveSingleWatch(String type) {
                return watches.get(type);
        }
}
